﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;
using SelfMadeMillionaire.Core.Entities;

namespace YahooFinanceWatcher.Models
{
    public class CompanyInfo
    {
        public int PortfolioId { get; set; }
        public string Symbol { get; set; }
        public string Url { get; set; }

        public string PrevClose { get; set; }
        public string Open { get; set; }
        public string Bid { get; set; }
        public string Ask { get; set; }
        public string TargetEst { get; set; }
        public string Beta { get; set; }
        public string NextEarningsDate { get; set; }

        public string DaysRange { get; set; }
        public string Wk52Range { get; set; }
        public string Volume { get; set; }
        public string AvgVol3m { get; set; }
        public string MarketCap { get; set; }
        public string PE { get; set; }
        public string EPS { get; set; }
        public string Div { get; set; }


    }

    public class HomeModel
    {
        public List<Portfolio> Portfolios { get; set; }

        public int SelectedId { get; set; }
        public string SelectedName { get; set; }

        [DisplayName("Symbol")]
        public string NameCompany { get; set; }
        public List<CompanyInfo> InfoList { get; set; }

        public bool NotFoundSymbol { get; set; }

        public HomeModel()
        {
            InfoList = new List<CompanyInfo>();
        }
    }

    public class PortfolioDialogModel
    {
        public int Id { get; set; }
        [DisplayName("Portfolio Name")]
        [Required(ErrorMessage = "Name is required")]
        public string Name { get; set; }
    }
}